<?php

namespace App\Http\Requests\Frontend\V10\Financial;

use App\Models\UserGlobal;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;

class ResetHandlerRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'global_status'=>['required',Rule::in([UserGlobal::STATUS_LOAN_REQUEST_FAILED,UserGlobal::STATUS_LOAN_RESTART])],
        ];
    }

    public function messages()
    {
        return [
            'status.required'=>'状态必填',
            'status.in'=>'状态不在可用范围内',
        ];
    }
}
